import request from '@/utils/request'

//生成验证码
export function generateVerifyCode() {
	return request({
		method: 'get',
		headers: {
			apiType: 3
		},
		url: 'image/getCode',
	})
}

//生成提取码
export function generateExtarCode() {
	return request({
		method: 'get',
		headers: {
			apiType: 3
		},
		url: 'image/getExtarCode'
	})
}

//生成随机码
export function generateUUID() {
	return request({
		method: 'get',
		headers: {
			apiType: 3
		},
		url: 'image/genUuid'
	})
}

//获取附件地址
export function getAttachUrl(data) {
	return request({
		method: 'get',
		headers: {
			apiType: 3
		},
		url: 'tbSysAttachment/queryPathById/' + data,
	})
}

//下载系统附件
export function downloadAttach(id) {
	return request({
		method: 'get',
		responseType: 'blob',
		url: 'tbSysAttachment/download/' + id
	})
}


//上传接口
export function fileUpload(data) {
	return request({
		method: 'post',
		url: 'tbSysAttachment/upload',
		data
	})
}

//获取网站基本信息
export function siteBaseInfo() {
	return request({
		method: 'get',
		headers: {
			apiType: 3
		},
		url: 'tbSysSite/queryHome'
	})
}